$(document).ready(function () {
  $('#success').css('background', '#00B7FF');
  // $('.case').first().addClass('active').siblings().hide();
  // $('.slide').first().addClass('active').siblings().removeClass('active');
  $('.right-arrow').on('click', function () {
    //右箭头
    // nextCase();
    // nextSlide();

  });
  $('.left-arrow').on('click', function () {
    //左箭头
    // prevCase();
    // prevSlide();
  });
  // autoslide(index);


  function nextCase() {
    var $current = $('.case.active');
    var $next = $current.next('.case');
    if ($next.length <= 0) {
      $next = $('.case').first();
    } else {
      $next = $current.next('.case');
    }
    $current.removeClass('active').hide();
    $next.addClass('active').show();
  }

  function nextSlide() {
    var $current = $('.slide.active');
    var $next = $current.next('.slide');
    if ($next.length <= 0) {
      $next = $('.slide').first();
    } else {
      $next = $current.next('.slide');
    }
    $current.removeClass('active');
    $next.addClass('active');
  }

  function prevCase() {
    var $current = $('.case.active');
    var $prev = $current.prev('.case');
    if ($prev.length <= 0) {
      $prev = $('.case').last();
    } else {
      $prev = $current.prev('.case');
    }
    $current.removeClass('active').hide();
    $prev.addClass('active').show();
  }

  function prevSlide() {
    var $current = $('.slide.active');
    var $prev = $current.prev('.slide');
    if ($prev.length <= 0) {
      $prev = $('.slide').last();
    } else {
      $prev = $current.prev('.slide');
    }
    $current.removeClass('active');
    $prev.addClass('active');
  }

  $('#success').css('background', '#036eb8');
  $('#success').css('color', '#fff')
}); 


